// 导入自己需要的组件
import 'element-plus/dist/index.css'
import {ElCarousel, ElCarouselItem} from 'element-plus'
import {App} from 'vue'

const components: any[] = [ElCarousel, ElCarouselItem]

const plugins: any[] = []

const element: any = {
  install: function (app: App<Element>) {
    components.forEach(component => {
      app.component(component.name, component)
    })

    plugins.forEach(plugin => {
      app.use(plugin)
    })

    // 全局配置
    app.config.globalProperties.$ELEMENT = {size: 'small', zIndex: 3000}
  }
}
export default element
